﻿@using Abp.Authorization.Users
<div>
    <form name="userCreateForm" role="form" novalidate class="form-validation">
        <div class="modal-header">
            <h4 class="modal-title">
                <span>@L("CreateNewUser")</span>
            </h4>
        </div>
        <div class="modal-body">

            <div class="form-group">
                <label>@L("UserName")</label>
                <input class="form-control" type="text" name="TenancyName" ng-model="vm.user.userName" required maxlength="@AbpUserBase.MaxUserNameLength">
            </div>

            <div class="form-group">
                <label>@L("Name")</label>
                <input type="text" name="Name" class="form-control" ng-model="vm.user.name" required maxlength="@AbpCompanyName.AbpProjectName.Users.User.MaxNameLength">
            </div>

            <div class="form-group">
                <label>@L("Surname")</label>
                <input type="text" name="Surname" class="form-control" ng-model="vm.user.surname" required maxlength="@AbpCompanyName.AbpProjectName.Users.User.MaxSurnameLength">
            </div>

            <div class="form-group">
                <label>@L("EmailAddress")</label>
                <input type="email" name="EmailAddress" class="form-control" ng-model="vm.user.emailAddress" required maxlength="@AbpCompanyName.AbpProjectName.Users.User.MaxEmailAddressLength">
            </div>

            <div class="form-group">
                <label>@L("Password")</label>
                <input type="password" name="Password" class="form-control" ng-model="vm.user.password" maxlength="@AbpCompanyName.AbpProjectName.Users.User.MaxPlainPasswordLength">
            </div>

            <div class="checkbox">
                <label>
                    <input type="checkbox" name="IsActive" ng-model="vm.user.isActive" value="true"> @L("IsActive")
                </label>
            </div>

        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="userCreateForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
        </div>
    </form>
</div>